package cn.controller;

import cn.common.LayTable;
import cn.kpi.entity.sys.UserEntity;
import cn.kpi.entity.usualassessment.UserAudio;
import cn.kpi.service.usualassessment.IAudioUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @BelongsProject: kpispis
 * @BelongsPackage: cn.controller
 * @Author: lizeze
 * @CreateTime: 2018-08-02 22:26
 * @Description: ${Description}
 */
@RestController
@RequestMapping("useraudio")
public class UserAuditorController {
    @Autowired
    IAudioUserService audioUserService;


    @RequestMapping(value = "/index")
    public String UserList(Model model) {


        return "usualassessment/useraudio";
    }

    @RequestMapping(value = "/getlist")
    public LayTable<UserAudio> getUserAudio(HttpServletRequest request, HttpServletResponse response) {

        List<UserAudio> lst = null;
        LayTable<UserAudio> layTable = new LayTable<UserAudio>();
        String strWhere = request.getParameter("where");
        lst = audioUserService.getUserAduio(strWhere);
        layTable.setData(lst);
        return layTable;
    }


}
